#include "Object3D.h"

Object3D::Object3D():scale(1.0f, 1.0f, 1.0f)
{
};

// destroy the object
Object3D::~Object3D()
{
    
}

// Get the transformation Matrix
Matrix* Object3D::GetTransform()
{
    transformMatrix.Reset();
    
    transformMatrix.Translate(position.x, position.y, position.z);
    transformMatrix.RotateX(rotation.x);
    transformMatrix.RotateY(rotation.y);
    transformMatrix.RotateZ(rotation.z);
    
    transformMatrix.Scale(scale.x, scale.y, scale.z);
    return &transformMatrix;
}

void Object3D::SetPosition(float x, float y, float z)
{
	//Ve model tai vi tri i,j o day
	this->position.x = x;
	this->position.y = y;
	this->position.z = z;
}

void Object3D::SetScale(float x, float y, float z)
{
	this->scale.x = x;
	this->scale.y = y;
	this->scale.z = z;
}

void Object3D::SetRotation(float x, float y, float z)
{
	this->rotation.x = x;
	this->rotation.y = y;
	this->rotation.z = z;
		 
}